package com.threegroup.web.dao;

import com.threegroup.web.entity.TokenEntity;
import org.apache.ibatis.annotations.Mapper;

/**
 * 用户Token
 * 
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
public interface TokenDao {
    TokenEntity getByToken(String token);

    TokenEntity getByUserId(Long userId);

    /**
     * 保存token
     * @param tokenEntity
     */
    void insert(TokenEntity tokenEntity);

    /**
     * 更新token
     * @param tokenEntity
     */
    void updateById(TokenEntity tokenEntity);
}
